from logger_util import build_logger

if '__main__' == __name__:

    import sys    
    import time
    from PyCmpltrtok.common import sep
    
    logger = build_logger('try_logger', 'try_logger.tmp.log', when_rotate='M')
    
    for i in range(7):
        n = i + 1
        sep(n)
        print(f'{n}th loggings ...', file=sys.stderr, flush=True)
        logger.fatal('A fatal error!')
        logger.error('A normal error.')
        logger.warning('A warning.')
        logger.info('An information.')
        logger.debug('A debugging information.')
        
        time.sleep(10)
        